package command;

import invoker.Ihm;
import receiver.MiniEditeurImpl;

public class Selectionner implements Command{

	private MiniEditeurImpl _mini;
	
	private Ihm _ihm;

	private int _deb;
	
	private int _fin;
	
	public Selectionner(MiniEditeurImpl mini, Ihm ihm) {
		super();
		this._mini = mini;
		this._ihm = ihm;
	}
	
	@Override
	public void execute() {
		_deb= _ihm.getDebutSelection();
		_fin= _ihm.getFinSelection();
		
		System.out.println("Debut  : "+_deb + "  Fin  : "+_fin);
		
		_mini.selectionner(_deb, _fin);
	}
	public MiniEditeurImpl getMini() {
		return _mini;
	}
	public void setMini(MiniEditeurImpl mini) {
		this._mini = mini;
	}
	public Ihm getIhm() {
		return _ihm;
	}
	public void setIhm(Ihm ihm) {
		this._ihm = ihm;
	}

	public void executeMem() {
		_deb= this.getDeb();
		_fin= this.getFin();
		System.out.println("###Selectionner###ici   "+_deb+"  et  "+_fin);
		_mini.selectionner(_deb, _fin);
	}
	
	public int getDeb() {
		return _deb;
	}
	public void setDeb(int deb) {
		this._deb = deb;
	}
	public int getFin() {
		return _fin;
	}
	public void setFin(int fin) {
		this._fin = fin;
	}
}
